#ifndef __CC_Detect_C
#define __CC_Detect_C

#include "CC_Detect.h"

// CC信号默认 = 1; 插枪就 = 0
void CC_init(){
    GPIO_Config_T     configStruct;

    RCM_EnableAPB2PeriphClock(CC_RCM);
	  //浮空输入
    configStruct.mode = GPIO_MODE_IN_FLOATING; 
    configStruct.pin  = CC_PinId;	  
    GPIO_Config(CC_PinPort, &configStruct);
}



uint8_t CC_get_level(){	  
	  return GPIO_ReadInputBit(CC_PinPort, CC_PinId);
}


#endif

